<!DOCTYPE HTML>
</html>
  <head>
    <title>-webkit-text-stroke shorthand getPropertyValue test</title>
    <style>
      .test {
        width: 5em;
        height: 10em;
      }
    </style>
    <script src="../../resources/js-test.js"></script>
    <script>
      if (window.testRunner)
        testRunner.dumpAsText();
    </script>
  </head>
  <body>
    <div id="text-stroke1" class="test" style="-webkit-text-stroke: thin red;"></div>
    <div id="text-stroke2" class="test" style="-webkit-text-stroke: green;"></div>
    <div id="text-stroke3" class="test" style="-webkit-text-stroke: thin;"></div>
    <div id="text-stroke4" class="test" style="-webkit-text-stroke: 1px red;"></div>
    <div id="text-stroke5" class="test" style="-webkit-text-stroke-width: 1px; -webkit-text-stroke-color: black;"></div>
    <div id="text-stroke6" class="test" style="-webkit-text-stroke: foo;"></div>
    <div id="text-stroke7" class="test" style="-webkit-text-stroke-color: green;"></div>
    <script>
      description("<a href=\"https://bugs.webkit.org/show_bug.cgi?id=111018\">Bug 111018: getPropertyValue for -webkit-text-stroke returns null, should compute the shorthand value</a>");

      function webkitTextStrokeValue(id) {
        var element = document.getElementById(id);
        return element.style.getPropertyValue("-webkit-text-stroke");
      }

      shouldBeEqualToString('webkitTextStrokeValue("text-stroke1")', 'thin red');
      shouldBeEqualToString('webkitTextStrokeValue("text-stroke2")', 'green');
      shouldBeEqualToString('webkitTextStrokeValue("text-stroke3")', 'thin');
      shouldBeEqualToString('webkitTextStrokeValue("text-stroke4")', '1px red');
      shouldBeEqualToString('webkitTextStrokeValue("text-stroke5")', '1px black');
      debug("NOTE: 'foo' is an illegal CSS value for '-webkit-text-stroke'.");
      shouldBeEqualToString('webkitTextStrokeValue("text-stroke6")', "");
      debug("NOTE: If only few longhand properties are specified, getPropertyValue for shorthand property returns empty string.")
      shouldBeEqualToString('webkitTextStrokeValue("text-stroke7")', "");
    </script>
  </body>
</html>
